//
//  WMRewardedVideoAd.h
//  WonderMobSDK
//
//  Created by zero on 2020/2/12.
//

#import <UIKit/UIKit.h>

#import "WMBaseAd.h"

NS_ASSUME_NONNULL_BEGIN

@class WMRewardedVideoAd, WMAdId;

@protocol WMRewardedVideoAdDelegate <NSObject>

@optional

/// 广告数据加载成功回调
/// @param rewardedVideoAd WMRewardedVideoAd 实例
- (void)wm_rewardVideoAdDidLoad:(WMRewardedVideoAd *)rewardedVideoAd;

/// 视频广告视频展示成功
/// @param rewardedVideoAd WMRewardedVideoAd 实例
- (void)wm_rewardVideoAdDidRenderSuccess:(WMRewardedVideoAd *)rewardedVideoAd;

/// 视频广告各种错误信息回调
/// @param rewardedVideoAd WMRewardedVideoAd 实例
/// @param error 具体错误信息
- (void)wm_rewardVideoAd:(WMRewardedVideoAd *)rewardedVideoAd didFailWithError:(NSError * _Nullable)error;

/// 关闭视频广告播且放达到激励条件回调
/// @param rewardedVideoAd WMRewardedVideoAd 实例
- (void)wm_rewardVideoAdDidRewardEffective:(WMRewardedVideoAd *)rewardedVideoAd;

/// 视频广告被点击
/// @param rewardedVideoAd WMRewardedVideoAd 实例
- (void)wm_onVideoAdDidClicked:(WMRewardedVideoAd *)rewardedVideoAd;

/// 关闭了广告视频，但点击了跳过的回调，没有奖励
/// @param rewardedVideoAd WMRewardedVideoAd 实例
- (void)wm_rewardVideoAdDidPlayFinish:(WMRewardedVideoAd *)rewardedVideoAd;

@end

@interface WMRewardedVideoAd : WMBaseAd

/// 展示广告方法
/// @param rootViewController 用于 present 激励视频 VC
/// @return 是否展示成功
- (BOOL)showAdFromRootViewController:(UIViewController *)rootViewController;

/// 委托对象
@property (nonatomic, weak) id<WMRewardedVideoAdDelegate> delegate;

@end

NS_ASSUME_NONNULL_END
